WARNING: This program doesn't work! It has a syntax error, which means it doesn't follow the coding rules.

RULE: Negative indexing allows us to access items in a list in reverse! The last item in a list can always be accessed at the index [-1]. This is useful if we don't know exactly how long a list is!

  • Click Run and read the error message.
  • Use a negative index for last_favorite_class on line 15 so that the sprite says the actual last favorite class!

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)